<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use Overtrue\Socialite\User;

/**
 * App\Model\UserBonusTurnWalletLog
 *
 * @property int $id
 * @property string|null $title 标题
 * @property string|null $content 内容
 * @property float $money 金额
 * @property int $user_id 用户id：A
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereContent($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereMoney($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Model\UserBonusTurnWalletLog whereUserId($value)
 * @mixin \Eloquent
 * @property-read \App\Model\UserWalletRecordLog $walletRecordLog
 */
class UserBonusTurnWalletLog extends Model
{
    protected $table = "user_bonus_turn_wallet_log";

    /**
     * 钱包转入记录属于哪个会员
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function user()
    {
        return $this->belongsTo (User::class, "user_id", "id");
    }

    /**
     * 会员钱包记录总表
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function walletRecordLog()
    {
        return $this->belongsTo(UserWalletRecordLog::class, "relation_id", "id");
    }
}
